{itemplate 'public/header'}
<form action="./index.php" class="form-horizontal form-filter" id="form1">
	{php echo tpl_form_filter_hidden('statcenter/box/index');}
	<input type="hidden" name="days" value="{$days}"/>
	<div class="form-group">
		<label class="col-xs-12 col-sm-3 col-md-2 control-label">筛选时间</label>
		<div class="col-sm-9 col-xs-12 js-daterange" data-form="#form1">
			<div class="btn-group">
				<a href="{php echo ifilter_url('days:0');}" class="btn {if !$days}btn-primary{else}btn-default{/if}">今天</a>
				<a href="{php echo ifilter_url('days:7');}" class="btn {if $days == 7}btn-primary{else}btn-default{/if}">最近7天</a>
				<a href="{php echo ifilter_url('days:30');}" class="btn {if $days == 30}btn-primary{else}btn-default{/if}">最近30天</a>
				<a href="javascript:;" class="btn js-btn-custom {if $days == -1}btn-primary{else}btn-default{/if}">自定义</a>
			</div>
			<span class="btn-daterange js-btn-daterange {if $days != -1}hide{/if}">
				{php echo tpl_form_field_daterange('stat_day', array('start' => $starttime, 'end' => $endtime));}
			</span>
		</div>
	</div>
	<div class="form-group clearfix form-inline">
		<label class="col-xs-12 col-sm-2 col-md-1 control-label">其他</label>
		<div class="col-sm-7 col-lg-8 col-xs-12">
			<select name="sid" class="form-control select2 js-select2 width-130">
				<option value="0" {if !$sid}selected{/if}>==选择线路==</option>
				{loop $stores $store}
				<option value="{$store['id']}" {if $store['id'] == $sid}selected{/if}>{$store['title']}</option>
				{/loop}
			</select>
		</div>
	</div>
</form>
<form action="" class="form-table form" method="post">
	<div class="panel panel-table">
		<div class="panel-body table-responsive">
			<table class="table table-bordered table-hover text-center" style="background: #fff">
			<thead class="navbar-inner">
			<tr>
				<th>商户</th>
				<th>餐盒费</th>
			</tr>
			</thead>
			<tbody>
			{loop $records $record}
				<tr>
					<td width="200"><strong>{$stores[$record['sid']]['title']}</strong></td>
					<td><strong>￥{php echo floatval($record['total_box_price']);}</strong></td>
				</tr>
			{/loop}
			</tbody>
		</table>
		</div>
	</div>
</form>
{itemplate 'public/footer'}